<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <div class="title">
    <div >flex布局</div>
    <div class="box">
        <span>item1</span>
        <span>item2</span>
        <span>
        <span>item3</span>
        <span>item3</span>
        <span>item3</span>
      </span>
    </div>
  </div>
<hr/>
<div class="title">
  <div>两边布局</div>
  <div class="side-container">
    <div class="side-left"></div>
    <div class="side-right"></div>
  </div>
</div>
<hr/>
<div class="title">
  <div>圣杯布局</div>
  <div class="cup-container">
    <div class="cup-left"></div>
    <div class="cup-center"></div>
    <div class="cup-right"></div>
  </div>
</div>
<hr/>
  <div class="title">
      <div>双飞翼布局</div>
      <div class="fly-container">
          <div class="fly-left"></div>
          <div class="fly-center">
              <div class="center-inner"></div>
          </div>
          <div class="fly-right"></div>
      </div>
  </div>
</body>
  <style>
    .title{
      background-color: aqua;
    }
    .title .box{
      display: flex;
      background-color: tomato;
      height: 300px;
      justify-content:  space-around;
      align-items: center;
    }
    .box span{
      background-color: aquamarine;
      height: 100px;
    }
    .side-container {
      height: 200px;
      display: flex;
    }
    .side-left {
      background-color: tomato;
      width: 200px;
      height: 200px;
    }

    .side-right {
      height: 200px;
      background-color: gold;
      flex: 1;/*内容区flex：1，内容区则会自动放大占满剩余空间。*/
    }

    .cup-container {
      height: 200px;
      /*padding: 0 200px;*/
      display: flex;
      justify-content: center;
    }
    .cup-left {
      height: 200px;
      background-color: tomato;
      width: 200px;
      float: left;
    }
    .cup-center {
      height: 200px;
      background-color: gold;
      width: 200px;
      float: left;
      margin-left: 20px;
      margin-right: 20px;
    }
    .cup-right {
        width: 200px;
        height: 200px;
        float: right;
      background-color: lightgreen;
    }

    .fly-container {
        height: 150px;
        margin: 0;
    }
    .fly-left {
        float: left;
        margin-left: -100%;
        width: 300px;
        background: orange;
    }
    .fly-center {
        float: left;
        width: 100%;
        background: tomato;
    }
    .fly-center .center-inner {
        margin-left: 300px;
    }
    .fly-right {
        float: left;
        margin-left: -200px;
        width: 200px;
        background: orange;
    }
  </style>
</html>